]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
boxpointer: Compute arrowStride using sourceActor monitor as reference
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 8 Mar 2019 20:21:28 +0000 (14:21 -0600)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 11 Apr 2019 19:38:17 +0000 (19:38 +0000)
I suppose this was also the goal of commit 96e14dc, but because it was checking
the value of the always-undefined this.sourceActor, it really never worked as
expected.

So, now since we assume that this._sourceActor is always defined just use it
as reference to compute the monitor menu position.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1029
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/435

js/ui/boxpointer.js

index 11b2bdda8e80401068baefeeddb5bc31ce33aa27..59c91f03751cb1a7aa99c26db9fcd413472c666e 100644 (file)
@@ -623,10 +623,7 @@ var BoxPointer = GObject.registerClass({
     _calculateArrowSide(arrowSide) {
         let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor);
         let [minWidth, minHeight, boxWidth, boxHeight] = this.get_preferred_size();
-        let monitorActor = this.sourceActor;
-        if (!monitorActor)
-            monitorActor = this;
-        let monitorIndex = Main.layoutManager.findIndexForActor(monitorActor);
+        let monitorIndex = Main.layoutManager.findIndexForActor(this._sourceActor);
         let workarea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
 
         switch (arrowSide) {